//https://www.bilibili.com/video/BV1d54y1f7B3/?spm_id_from=333.337.search-card.all.click&vd_source=d6fe65f095f01f05591e89d810720ccc
// 2024-10-20

import java.util.LinkedList;
import java.util.Queue;

public class P023_最长连续递增序列_贪心算法 {

    public static void main(String[] args) {
        System.out.println(fun(new int[] {1,2,3,2,3,4,3,4,5,6,7}));
    }

    private static int fun(int[] nums) {
        int start = 0;
        int max = Integer.MIN_VALUE;

        //从1开始
        for (int i = 1; i < nums.length; i++) {
            if (nums[i] <= nums[i-1]) start = i;//说明不递增了，更新开始值
            max = Math.max(max,i - start + 1);//递增，更新max
        }
        return max;
    }
}
